package com.elm.service;

import java.util.List;
import com.elm.po.Business;

public interface BusinessService {
	public List<Business> getBusinessByOrderTypeId(Integer orderTypeId);    

	public Business getBusinessById(Integer businessId);

	public List<Business> getBusinessBySales();		//按销量排序， 获取时记得where status=opening
	
	public List<Business> getBusinessByStar();		//按评分排序
	
	//admin专属操作			Integer userId均为身份验证，暂时如此,后续改为token
	public List<Business> getAllReviewingBusiness();   //admin获取所有未审核的商家,调用时需要提供userID验证用户是谁
	
	public int updateReviewingBusinessInfo(Integer businessId, boolean result);	//admin审核，商家id，bool结果（1通过，2不通过）
	
	
	//商家boss专属操作
	public int createBusiness(Business business);		//商家发起开店请求，向后端发送business相关信息,返回值1发送成功，0发送失败(仅网络问题，不代表审核结果)
	
	public int updateBusiness(Business business);         //传来的business既包含对商家页面修改的操作，也包含对status的操作，即删除(下线)，关门等
	
	//商家staff
	public int updateBusinessStatus(Business business);         //传来的business只包含对status开门关门的操作 
	
	
}